<template>
    <div>

        <iframe
            :src="'https://zmdlh.wuliangye.com.cn/sgb-web-management/giftManager?token='+this.token+'&userId='+this.userId+'&userName='+this.userName+'&depName='+this.depName+'&depType='+this.depType+'&depCode='+this.depCode"
            width
            height
            frameborder="0"
            style='overflow-x：hidden ; overflow-y：auto；'
            name="iframe名称"
            scrolling="yes"
        ></iframe>
    </div>
</template>

<script>
import { getSgbLoginToken } from "@/api/liveplan";
export default {
  data() {
    return {
      logininfo: {},
      token: "",
      userId: "",
      userName: "",
      depName: "",
      depType: "",
      depCode: "",
      orgSeq: "",
      orgType: "",
      selfWarzoneCode: ""
    };
  },
  created() { this.logininfo = localStorage.getItem("logininfo");
    console.log(this.logininfo, "8888");
    let orgJson = JSON.parse(this.logininfo);
  
    this.userId = orgJson.userId;
    this.userName = orgJson.userName;

    this.depName = orgJson.orgName;
    this.depType = orgJson.orgType;
    this.depCode = orgJson.orgSeq;

    this.getgetSgbLoginToken();
},
  mounted() {
   
  },
  methods: {
    getgetSgbLoginToken() {
      let data = {
        userId: this.userId,
        userName: this.userName,
        depCode: this.depCode,
        depName: this.depName,
        depType: this.depType
      };
      getSgbLoginToken(data).then(res => {
          this.token=res.result.token
              console.log(
      "https://zmdlh.wuliangye.com.cn/sgb-web-management/giftManager?token=" +
        this.token +
        "&userId=" +
        this.userId +
        "&userName=" +
        this.userName +
        "&depName=" +
        this.depName +
        "&depType=" +
        this.depType +
        "&depCode=" +
        this.depCode,
      "9999"
    );
      });
    }
  }
};
</script>
<style  lang="less" scoped>
iframe {
  width: 100%;
  height: 700px;
  
}
</style>